package com.qf.utils;

import com.qf.entity.User;

public class SecurityContextHolder {

    private static ThreadLocal<User> threadLocal = new ThreadLocal<>();

    public static void setUser(User user){
        threadLocal.set(user);
    }

    public static void removeUser(){
        threadLocal.remove();
    }

    public static User getUser(){
        return threadLocal.get();
    }
}
